<template>
  <iframe :src="href" frameborder="no" border="0" v-if="href" style="width: 100%;height: 100%;" />
</template>

<script>
export default {
  props: {
    ebook: {
      type: Object,
      default: () => null
    },
    route: {
      type: Object,
      default: () => null
    }
  },
  data() {
    return { 
      href: '' 
    }
  },
  async mounted() {
    var linear = await this.ebook.getLinearItem(this.route.linear)
    this.href = linear
  }
}
</script>

<style>

</style>